package day03;

public class OperDemo1 {
    public static void main(String[] args) {
        //演示++单独使用
        /*
        int a = 5;
        int b = 5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);
         */

        //演示++被使用：a++的值为a,++a的值为a+1
        /*
        int c = 5,d = 5;
        int e = c++;
        int f = ++d;
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        System.out.println(f);
        */

        //演示--单独使用
        int a = 5;
        int b = 5;
        a--;
        --b;
        System.out.println(a);
        System.out.println(b);

        //演示--被使用；a--的值为a，--a的值为a-1
        int c=5,d=5;
        int e = c--;
        int f = --d;
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        System.out.println(f);

    }
}
